package com.example.zzm.yuejian03.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.example.zzm.yuejian03.Bean.ActivBean;
import com.example.zzm.yuejian03.Listener.TListener;
import com.example.zzm.yuejian03.Model.ActivdetailsModel;
import com.example.zzm.yuejian03.R;
import com.example.zzm.yuejian03.Server;
import com.squareup.picasso.Picasso;

public class BaominactivActivity extends AppCompatActivity {

    private TextView textView11,textView62,textView64,textView66,textView68,textView70;
    private EditText editText3,editText4;

    public void  onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.baominactiv);
        initView();
        initEvent();
        initDate();
        ActivdetailsModel ActivdetailsModel = new ActivdetailsModel();
        ActivdetailsModel.getActivdetailss(getIntent().getIntExtra("activity_id",1),listener);
    }

    TListener<ActivBean> listener = new TListener<ActivBean>() {
        @Override
        public void onResponse(ActivBean club) {
            textView62.setText(club.getName());
            textView64.setText(club.getTime());
            textView66.setText(club.getAddress());
            textView70.setText(Integer.toString(club.getPrice()));
            textView68.setText(club.getIntro());
        }
        @Override
        public void onFail(String msg) {

        }
    };

    private void initDate() {

    }

    private void initEvent() {
        textView11.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }

    private void initView() {
        textView11 = (TextView)findViewById(R.id.textView11);
        editText3 = (EditText)findViewById(R.id.editText3);
        editText4 = (EditText)findViewById(R.id.editText4);
        textView62 = (TextView)findViewById(R.id.textView62);
        textView64 = (TextView)findViewById(R.id.textView64);
        textView66 = (TextView)findViewById(R.id.textView66);
        textView68 = (TextView)findViewById(R.id.textView68);
        textView70 = (TextView)findViewById(R.id.textView70);
    }
}
